package com.superheroes.controller.encryption.sys;

import com.superheroes.entity.SysUser;
import com.superheroes.service.SysUserService;
import com.superheroes.utils.result.NotSayUncle;
import com.superheroes.vo.UserVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;


/**
 * 验证码提供
 * @author zlt
 * @date 2018/12/18
 */
@RestController
@RequestMapping("sys")
@Api(tags = "用户服务")
public class SysUserController {

    @Autowired
    private SysUserService sysUserService;


    @GetMapping("/user")
    public void addUser() {
        SysUser sysUser =new SysUser();
        sysUser.setId(null);
        System.out.println(sysUser.getId());
    }


    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "接口返回成功状态"),
            @ApiResponse(code = 500, message = "接口返回未知错误，请联系开发人员调试")
    })
    @ApiOperation(value = "Hello 测试接口", notes = "访问此接口，返回hello语句，测试接口")
    @PostMapping("hello")
    public NotSayUncle hello(@Valid UserVo userVo)  {

        String aaaa="我是你爸爸";
        return NotSayUncle.ok(aaaa);
    }





}
